<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: hardware_divider</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__hardware__divider.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">hardware_divider<div class="ingroups"><a class="el" href="group__hardware.html">Hardware APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>RP2040 Low Low-level hardware-divider API. Non-RP2040 platforms provide software versions of all the functions.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga806e168e895d53a3c261ba3e95ed2639"><td class="memItemLeft" align="right" valign="top">static divmod_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga806e168e895d53a3c261ba3e95ed2639">hw_divider_divmod_s32</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga806e168e895d53a3c261ba3e95ed2639"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a signed HW divide and wait for result.  <a href="group__hardware__divider.html#ga806e168e895d53a3c261ba3e95ed2639">More...</a><br /></td></tr>
<tr class="separator:ga806e168e895d53a3c261ba3e95ed2639"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2f4fea8c3ef19a04e574f64f5f520c2"><td class="memItemLeft" align="right" valign="top">static divmod_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gac2f4fea8c3ef19a04e574f64f5f520c2">hw_divider_divmod_u32</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:gac2f4fea8c3ef19a04e574f64f5f520c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do an unsigned HW divide and wait for result.  <a href="group__hardware__divider.html#gac2f4fea8c3ef19a04e574f64f5f520c2">More...</a><br /></td></tr>
<tr class="separator:gac2f4fea8c3ef19a04e574f64f5f520c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3388fa85b0c81ee403a3e5bb34dc7274"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">hw_divider_divmod_s32_start</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga3388fa85b0c81ee403a3e5bb34dc7274"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a signed asynchronous divide.  <a href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">More...</a><br /></td></tr>
<tr class="separator:ga3388fa85b0c81ee403a3e5bb34dc7274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30b74e3742fbd3aeb6dfca568e8d0ae4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga30b74e3742fbd3aeb6dfca568e8d0ae4">hw_divider_divmod_u32_start</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:ga30b74e3742fbd3aeb6dfca568e8d0ae4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start an unsigned asynchronous divide.  <a href="group__hardware__divider.html#ga30b74e3742fbd3aeb6dfca568e8d0ae4">More...</a><br /></td></tr>
<tr class="separator:ga30b74e3742fbd3aeb6dfca568e8d0ae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82cfc7c264f332ad15135158a37821dc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc">hw_divider_wait_ready</a> (void)</td></tr>
<tr class="memdesc:ga82cfc7c264f332ad15135158a37821dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for a divide to complete.  <a href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc">More...</a><br /></td></tr>
<tr class="separator:ga82cfc7c264f332ad15135158a37821dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga57310adb7901fb25ee82370130834e1d"><td class="memItemLeft" align="right" valign="top">static divmod_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga57310adb7901fb25ee82370130834e1d">hw_divider_result_nowait</a> (void)</td></tr>
<tr class="memdesc:ga57310adb7901fb25ee82370130834e1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of HW divide, nowait.  <a href="group__hardware__divider.html#ga57310adb7901fb25ee82370130834e1d">More...</a><br /></td></tr>
<tr class="separator:ga57310adb7901fb25ee82370130834e1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1fa72fbead3c6737dfcb4dd7b3db6ed"><td class="memItemLeft" align="right" valign="top">static divmod_result_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gac1fa72fbead3c6737dfcb4dd7b3db6ed">hw_divider_result_wait</a> (void)</td></tr>
<tr class="memdesc:gac1fa72fbead3c6737dfcb4dd7b3db6ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of last asynchronous HW divide.  <a href="group__hardware__divider.html#gac1fa72fbead3c6737dfcb4dd7b3db6ed">More...</a><br /></td></tr>
<tr class="separator:gac1fa72fbead3c6737dfcb4dd7b3db6ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21752b8ee127370df37cd9a9e4e4050e"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga21752b8ee127370df37cd9a9e4e4050e">to_quotient_u32</a> (divmod_result_t r)</td></tr>
<tr class="memdesc:ga21752b8ee127370df37cd9a9e4e4050e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Efficient extraction of unsigned quotient from 32p32 fixed point.  <a href="group__hardware__divider.html#ga21752b8ee127370df37cd9a9e4e4050e">More...</a><br /></td></tr>
<tr class="separator:ga21752b8ee127370df37cd9a9e4e4050e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62820b8678505f5ea007cedd012da0aa"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">to_quotient_s32</a> (divmod_result_t r)</td></tr>
<tr class="memdesc:ga62820b8678505f5ea007cedd012da0aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Efficient extraction of signed quotient from 32p32 fixed point.  <a href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">More...</a><br /></td></tr>
<tr class="separator:ga62820b8678505f5ea007cedd012da0aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea3762e4a27f1e42f8e03e6607917462"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gaea3762e4a27f1e42f8e03e6607917462">to_remainder_u32</a> (divmod_result_t r)</td></tr>
<tr class="memdesc:gaea3762e4a27f1e42f8e03e6607917462"><td class="mdescLeft">&#160;</td><td class="mdescRight">Efficient extraction of unsigned remainder from 32p32 fixed point.  <a href="group__hardware__divider.html#gaea3762e4a27f1e42f8e03e6607917462">More...</a><br /></td></tr>
<tr class="separator:gaea3762e4a27f1e42f8e03e6607917462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ca08fd8fd1961ee25233d4587067178"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">to_remainder_s32</a> (divmod_result_t r)</td></tr>
<tr class="memdesc:ga7ca08fd8fd1961ee25233d4587067178"><td class="mdescLeft">&#160;</td><td class="mdescRight">Efficient extraction of signed remainder from 32p32 fixed point.  <a href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">More...</a><br /></td></tr>
<tr class="separator:ga7ca08fd8fd1961ee25233d4587067178"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56d6c26b06211b6f6ae3069b2c612562"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga56d6c26b06211b6f6ae3069b2c612562">hw_divider_u32_quotient_wait</a> (void)</td></tr>
<tr class="memdesc:ga56d6c26b06211b6f6ae3069b2c612562"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of last asynchronous HW divide, unsigned quotient only.  <a href="group__hardware__divider.html#ga56d6c26b06211b6f6ae3069b2c612562">More...</a><br /></td></tr>
<tr class="separator:ga56d6c26b06211b6f6ae3069b2c612562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab10a183b8e7bd77ae20a811a4265ea56"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gab10a183b8e7bd77ae20a811a4265ea56">hw_divider_s32_quotient_wait</a> (void)</td></tr>
<tr class="memdesc:gab10a183b8e7bd77ae20a811a4265ea56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of last asynchronous HW divide, signed quotient only.  <a href="group__hardware__divider.html#gab10a183b8e7bd77ae20a811a4265ea56">More...</a><br /></td></tr>
<tr class="separator:gab10a183b8e7bd77ae20a811a4265ea56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e23739484aa748a5900d215d279acdf"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga2e23739484aa748a5900d215d279acdf">hw_divider_u32_remainder_wait</a> (void)</td></tr>
<tr class="memdesc:ga2e23739484aa748a5900d215d279acdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of last asynchronous HW divide, unsigned remainder only.  <a href="group__hardware__divider.html#ga2e23739484aa748a5900d215d279acdf">More...</a><br /></td></tr>
<tr class="separator:ga2e23739484aa748a5900d215d279acdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2e7f31926e286544a8d47fdf8131eb5"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gad2e7f31926e286544a8d47fdf8131eb5">hw_divider_s32_remainder_wait</a> (void)</td></tr>
<tr class="memdesc:gad2e7f31926e286544a8d47fdf8131eb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return result of last asynchronous HW divide, signed remainder only.  <a href="group__hardware__divider.html#gad2e7f31926e286544a8d47fdf8131eb5">More...</a><br /></td></tr>
<tr class="separator:gad2e7f31926e286544a8d47fdf8131eb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f8f25f9f8feefb588fefed9992e180b"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga8f8f25f9f8feefb588fefed9992e180b">hw_divider_u32_quotient</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:ga8f8f25f9f8feefb588fefed9992e180b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do an unsigned HW divide, wait for result, return quotient.  <a href="group__hardware__divider.html#ga8f8f25f9f8feefb588fefed9992e180b">More...</a><br /></td></tr>
<tr class="separator:ga8f8f25f9f8feefb588fefed9992e180b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9fec9c4204fb6f874f660b529190d96"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gaa9fec9c4204fb6f874f660b529190d96">hw_divider_u32_remainder</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:gaa9fec9c4204fb6f874f660b529190d96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do an unsigned HW divide, wait for result, return remainder.  <a href="group__hardware__divider.html#gaa9fec9c4204fb6f874f660b529190d96">More...</a><br /></td></tr>
<tr class="separator:gaa9fec9c4204fb6f874f660b529190d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a4e287ce14e27ad959f30e16ee17e4f"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga1a4e287ce14e27ad959f30e16ee17e4f">hw_divider_quotient_s32</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga1a4e287ce14e27ad959f30e16ee17e4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a signed HW divide, wait for result, return quotient.  <a href="group__hardware__divider.html#ga1a4e287ce14e27ad959f30e16ee17e4f">More...</a><br /></td></tr>
<tr class="separator:ga1a4e287ce14e27ad959f30e16ee17e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41fe9c9d7dd1e9638ec5dd724698adad"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga41fe9c9d7dd1e9638ec5dd724698adad">hw_divider_remainder_s32</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga41fe9c9d7dd1e9638ec5dd724698adad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a signed HW divide, wait for result, return remainder.  <a href="group__hardware__divider.html#ga41fe9c9d7dd1e9638ec5dd724698adad">More...</a><br /></td></tr>
<tr class="separator:ga41fe9c9d7dd1e9638ec5dd724698adad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac9751d0cb261941773c083d1e79569e3"><td class="memItemLeft" align="right" valign="top"><a id="gac9751d0cb261941773c083d1e79569e3" name="gac9751d0cb261941773c083d1e79569e3"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>hw_divider_pause</b> (void)</td></tr>
<tr class="memdesc:gac9751d0cb261941773c083d1e79569e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pause for exact amount of time needed for a asynchronous divide to complete. <br /></td></tr>
<tr class="separator:gac9751d0cb261941773c083d1e79569e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad18c35723af182a45e044b29cd1e60b2"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gad18c35723af182a45e044b29cd1e60b2">hw_divider_u32_quotient_inlined</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:gad18c35723af182a45e044b29cd1e60b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a hardware unsigned HW divide, wait for result, return quotient.  <a href="group__hardware__divider.html#gad18c35723af182a45e044b29cd1e60b2">More...</a><br /></td></tr>
<tr class="separator:gad18c35723af182a45e044b29cd1e60b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga46f7b5751556b7b1d5600561160abb3c"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga46f7b5751556b7b1d5600561160abb3c">hw_divider_u32_remainder_inlined</a> (uint32_t a, uint32_t b)</td></tr>
<tr class="memdesc:ga46f7b5751556b7b1d5600561160abb3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a hardware unsigned HW divide, wait for result, return remainder.  <a href="group__hardware__divider.html#ga46f7b5751556b7b1d5600561160abb3c">More...</a><br /></td></tr>
<tr class="separator:ga46f7b5751556b7b1d5600561160abb3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23a3a2a911f5d78bb56799969b079f94"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga23a3a2a911f5d78bb56799969b079f94">hw_divider_s32_quotient_inlined</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga23a3a2a911f5d78bb56799969b079f94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a hardware signed HW divide, wait for result, return quotient.  <a href="group__hardware__divider.html#ga23a3a2a911f5d78bb56799969b079f94">More...</a><br /></td></tr>
<tr class="separator:ga23a3a2a911f5d78bb56799969b079f94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82f0cdc6ef9e74346c0af8e492a0eb8d"><td class="memItemLeft" align="right" valign="top">static int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#ga82f0cdc6ef9e74346c0af8e492a0eb8d">hw_divider_s32_remainder_inlined</a> (int32_t a, int32_t b)</td></tr>
<tr class="memdesc:ga82f0cdc6ef9e74346c0af8e492a0eb8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do a hardware signed HW divide, wait for result, return remainder.  <a href="group__hardware__divider.html#ga82f0cdc6ef9e74346c0af8e492a0eb8d">More...</a><br /></td></tr>
<tr class="separator:ga82f0cdc6ef9e74346c0af8e492a0eb8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac12f398a163e90ca4d52386bd7e161b9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gac12f398a163e90ca4d52386bd7e161b9">hw_divider_save_state</a> (hw_divider_state_t *dest)</td></tr>
<tr class="memdesc:gac12f398a163e90ca4d52386bd7e161b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the calling cores hardware divider state.  <a href="group__hardware__divider.html#gac12f398a163e90ca4d52386bd7e161b9">More...</a><br /></td></tr>
<tr class="separator:gac12f398a163e90ca4d52386bd7e161b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8efb2ea90ef78f863b1c518c5824002"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__divider.html#gaa8efb2ea90ef78f863b1c518c5824002">hw_divider_restore_state</a> (hw_divider_state_t *src)</td></tr>
<tr class="memdesc:gaa8efb2ea90ef78f863b1c518c5824002"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load a saved hardware divider state into the current core's hardware divider.  <a href="group__hardware__divider.html#gaa8efb2ea90ef78f863b1c518c5824002">More...</a><br /></td></tr>
<tr class="separator:gaa8efb2ea90ef78f863b1c518c5824002"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >RP2040 Low Low-level hardware-divider API. Non-RP2040 platforms provide software versions of all the functions. </p>
<p >The SIO contains an 8-cycle signed/unsigned divide/modulo circuit, per core. Calculation is started by writing a dividend and divisor to the two argument registers, DIVIDEND and DIVISOR. The divider calculates the quotient / and remainder % of this division over the next 8 cycles, and on the 9th cycle the results can be read from the two result registers DIV_QUOTIENT and DIV_REMAINDER. A 'ready' bit in register DIV_CSR can be polled to wait for the calculation to complete, or software can insert a fixed 8-cycle delay</p>
<p >This header provides low level macros and inline functions for accessing the hardware dividers directly, and perhaps most usefully performing asynchronous divides. These functions however do not follow the regular SDK conventions for saving/restoring the divider state, so are not generally safe to call from interrupt handlers</p>
<p >The pico_divider library provides a more user friendly set of APIs over the divider (and support for 64 bit divides), and of course by default regular C language integer divisions are redirected through that library, meaning you can just use C level <code>/</code> and <code>%</code> operators and gain the benefits of the fast hardware divider.</p>
<p >On RP2350 there is no hardware divider, and the functions are implemented in software </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__divider.html" title="Optimized 32 and 64 bit division functions accelerated by the RP2040 hardware divider.">pico_divider</a></dd></dl>
<h2><a class="anchor" id="divider_example"></a>
Example</h2>
<div class="fragment"><div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="stdio_8h.html">stdio.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="stdlib_8h.html">pico/stdlib.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="rp2__common_2hardware__divider_2include_2hardware_2divider_8h.html">hardware/divider.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line">    <a class="code hl_function" href="group__pico__stdio.html#ga0e604311fb226dae91ff4eb17a19d67a">stdio_init_all</a>();</div>
<div class="line">    printf(<span class="stringliteral">&quot;Hello, divider!\n&quot;</span>);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// This is the basic hardware divider function</span></div>
<div class="line">    int32_t dividend = 123456;</div>
<div class="line">    int32_t divisor = -321;</div>
<div class="line">    divmod_result_t result = <a class="code hl_function" href="group__hardware__divider.html#ga806e168e895d53a3c261ba3e95ed2639">hw_divider_divmod_s32</a>(dividend, divisor);</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;%d/%d = %d remainder %d\n&quot;</span>, dividend, divisor, <a class="code hl_function" href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">to_quotient_s32</a>(result), <a class="code hl_function" href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">to_remainder_s32</a>(result));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Is it right?</span></div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;Working backwards! Result %d should equal %d!\n\n&quot;</span>,</div>
<div class="line">           <a class="code hl_function" href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">to_quotient_s32</a>(result) * divisor + <a class="code hl_function" href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">to_remainder_s32</a>(result), dividend);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// This is the recommended unsigned fast divider for general use.</span></div>
<div class="line">    int32_t udividend = 123456;</div>
<div class="line">    int32_t udivisor = 321;</div>
<div class="line">    divmod_result_t uresult = <a class="code hl_function" href="group__hardware__divider.html#gac2f4fea8c3ef19a04e574f64f5f520c2">hw_divider_divmod_u32</a>(udividend, udivisor);</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;%d/%d = %d remainder %d\n&quot;</span>, udividend, udivisor, <a class="code hl_function" href="group__hardware__divider.html#ga21752b8ee127370df37cd9a9e4e4050e">to_quotient_u32</a>(uresult), <a class="code hl_function" href="group__hardware__divider.html#gaea3762e4a27f1e42f8e03e6607917462">to_remainder_u32</a>(uresult));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Is it right?</span></div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;Working backwards! Result %d should equal %d!\n\n&quot;</span>,</div>
<div class="line">           <a class="code hl_function" href="group__hardware__divider.html#ga21752b8ee127370df37cd9a9e4e4050e">to_quotient_u32</a>(result) * divisor + <a class="code hl_function" href="group__hardware__divider.html#gaea3762e4a27f1e42f8e03e6607917462">to_remainder_u32</a>(result), dividend);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// You can also do divides asynchronously. Divides will be complete after 8 cycles.</span></div>
<div class="line"> </div>
<div class="line">    <a class="code hl_function" href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">hw_divider_divmod_s32_start</a>(dividend, divisor);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Do something for 8 cycles!</span></div>
<div class="line"> </div>
<div class="line">    <span class="comment">// In this example, our results function will wait for completion.</span></div>
<div class="line">    <span class="comment">// Use hw_divider_result_nowait() if you don&#39;t want to wait, but are sure you have delayed at least 8 cycles</span></div>
<div class="line"> </div>
<div class="line">    result = <a class="code hl_function" href="group__hardware__divider.html#gac1fa72fbead3c6737dfcb4dd7b3db6ed">hw_divider_result_wait</a>();</div>
<div class="line"> </div>
<div class="line">    printf(<span class="stringliteral">&quot;Async result %d/%d = %d remainder %d\n&quot;</span>, dividend, divisor, <a class="code hl_function" href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">to_quotient_s32</a>(result),</div>
<div class="line">           <a class="code hl_function" href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">to_remainder_s32</a>(result));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// For a really fast divide, you can use the inlined versions... the / involves a function call as / always does</span></div>
<div class="line">    <span class="comment">// when using the ARM AEABI, so if you really want the best performance use the inlined versions.</span></div>
<div class="line">    <span class="comment">// Note that the / operator function DOES use the hardware divider by default, although you can change</span></div>
<div class="line">    <span class="comment">// that behavior by calling pico_set_divider_implementation in the cmake build for your target.</span></div>
<div class="line">    printf(<span class="stringliteral">&quot;%d / %d = (by operator %d) (inlined %d)\n&quot;</span>, dividend, divisor,</div>
<div class="line">           dividend / divisor, <a class="code hl_function" href="group__hardware__divider.html#ga23a3a2a911f5d78bb56799969b079f94">hw_divider_s32_quotient_inlined</a>(dividend, divisor));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Note however you must manually save/restore the divider state if you call the inlined methods from within an IRQ</span></div>
<div class="line">    <span class="comment">// handler.</span></div>
<div class="line">    hw_divider_state_t state;</div>
<div class="line">    <a class="code hl_function" href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">hw_divider_divmod_s32_start</a>(dividend, divisor);</div>
<div class="line">    <a class="code hl_function" href="group__hardware__divider.html#gac12f398a163e90ca4d52386bd7e161b9">hw_divider_save_state</a>(&amp;state);</div>
<div class="line"> </div>
<div class="line">    <a class="code hl_function" href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">hw_divider_divmod_s32_start</a>(123, 7);</div>
<div class="line">    printf(<span class="stringliteral">&quot;inner %d / %d = %d\n&quot;</span>, 123, 7, <a class="code hl_function" href="group__hardware__divider.html#gab10a183b8e7bd77ae20a811a4265ea56">hw_divider_s32_quotient_wait</a>());</div>
<div class="line"> </div>
<div class="line">    <a class="code hl_function" href="group__hardware__divider.html#gaa8efb2ea90ef78f863b1c518c5824002">hw_divider_restore_state</a>(&amp;state);</div>
<div class="line">    int32_t tmp = <a class="code hl_function" href="group__hardware__divider.html#gab10a183b8e7bd77ae20a811a4265ea56">hw_divider_s32_quotient_wait</a>();</div>
<div class="line">    printf(<span class="stringliteral">&quot;outer divide %d / %d = %d\n&quot;</span>, dividend, divisor, tmp);</div>
<div class="line">    <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="agroup__hardware__divider_html_ga21752b8ee127370df37cd9a9e4e4050e"><div class="ttname"><a href="group__hardware__divider.html#ga21752b8ee127370df37cd9a9e4e4050e">to_quotient_u32</a></div><div class="ttdeci">static uint32_t to_quotient_u32(divmod_result_t r)</div><div class="ttdoc">Efficient extraction of unsigned quotient from 32p32 fixed point.</div><div class="ttdef"><b>Definition:</b> divider.h:198</div></div>
<div class="ttc" id="agroup__hardware__divider_html_ga23a3a2a911f5d78bb56799969b079f94"><div class="ttname"><a href="group__hardware__divider.html#ga23a3a2a911f5d78bb56799969b079f94">hw_divider_s32_quotient_inlined</a></div><div class="ttdeci">static int32_t hw_divider_s32_quotient_inlined(int32_t a, int32_t b)</div><div class="ttdoc">Do a hardware signed HW divide, wait for result, return quotient.</div><div class="ttdef"><b>Definition:</b> divider.h:440</div></div>
<div class="ttc" id="agroup__hardware__divider_html_ga3388fa85b0c81ee403a3e5bb34dc7274"><div class="ttname"><a href="group__hardware__divider.html#ga3388fa85b0c81ee403a3e5bb34dc7274">hw_divider_divmod_s32_start</a></div><div class="ttdeci">static void hw_divider_divmod_s32_start(int32_t a, int32_t b)</div><div class="ttdoc">Start a signed asynchronous divide.</div><div class="ttdef"><b>Definition:</b> divider.h:107</div></div>
<div class="ttc" id="agroup__hardware__divider_html_ga62820b8678505f5ea007cedd012da0aa"><div class="ttname"><a href="group__hardware__divider.html#ga62820b8678505f5ea007cedd012da0aa">to_quotient_s32</a></div><div class="ttdeci">static int32_t to_quotient_s32(divmod_result_t r)</div><div class="ttdoc">Efficient extraction of signed quotient from 32p32 fixed point.</div><div class="ttdef"><b>Definition:</b> divider.h:208</div></div>
<div class="ttc" id="agroup__hardware__divider_html_ga7ca08fd8fd1961ee25233d4587067178"><div class="ttname"><a href="group__hardware__divider.html#ga7ca08fd8fd1961ee25233d4587067178">to_remainder_s32</a></div><div class="ttdeci">static int32_t to_remainder_s32(divmod_result_t r)</div><div class="ttdoc">Efficient extraction of signed remainder from 32p32 fixed point.</div><div class="ttdef"><b>Definition:</b> divider.h:232</div></div>
<div class="ttc" id="agroup__hardware__divider_html_ga806e168e895d53a3c261ba3e95ed2639"><div class="ttname"><a href="group__hardware__divider.html#ga806e168e895d53a3c261ba3e95ed2639">hw_divider_divmod_s32</a></div><div class="ttdeci">static divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b)</div><div class="ttdoc">Do a signed HW divide and wait for result.</div><div class="ttdef"><b>Definition:</b> divider.h:74</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gaa8efb2ea90ef78f863b1c518c5824002"><div class="ttname"><a href="group__hardware__divider.html#gaa8efb2ea90ef78f863b1c518c5824002">hw_divider_restore_state</a></div><div class="ttdeci">static void hw_divider_restore_state(hw_divider_state_t *src)</div><div class="ttdoc">Load a saved hardware divider state into the current core's hardware divider.</div><div class="ttdef"><b>Definition:</b> divider.h:506</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gab10a183b8e7bd77ae20a811a4265ea56"><div class="ttname"><a href="group__hardware__divider.html#gab10a183b8e7bd77ae20a811a4265ea56">hw_divider_s32_quotient_wait</a></div><div class="ttdeci">static int32_t hw_divider_s32_quotient_wait(void)</div><div class="ttdoc">Return result of last asynchronous HW divide, signed quotient only.</div><div class="ttdef"><b>Definition:</b> divider.h:260</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gac12f398a163e90ca4d52386bd7e161b9"><div class="ttname"><a href="group__hardware__divider.html#gac12f398a163e90ca4d52386bd7e161b9">hw_divider_save_state</a></div><div class="ttdeci">static void hw_divider_save_state(hw_divider_state_t *dest)</div><div class="ttdoc">Save the calling cores hardware divider state.</div><div class="ttdef"><b>Definition:</b> divider.h:491</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gac1fa72fbead3c6737dfcb4dd7b3db6ed"><div class="ttname"><a href="group__hardware__divider.html#gac1fa72fbead3c6737dfcb4dd7b3db6ed">hw_divider_result_wait</a></div><div class="ttdeci">static divmod_result_t hw_divider_result_wait(void)</div><div class="ttdoc">Return result of last asynchronous HW divide.</div><div class="ttdef"><b>Definition:</b> divider.h:187</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gac2f4fea8c3ef19a04e574f64f5f520c2"><div class="ttname"><a href="group__hardware__divider.html#gac2f4fea8c3ef19a04e574f64f5f520c2">hw_divider_divmod_u32</a></div><div class="ttdeci">static divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b)</div><div class="ttdoc">Do an unsigned HW divide and wait for result.</div><div class="ttdef"><b>Definition:</b> divider.h:92</div></div>
<div class="ttc" id="agroup__hardware__divider_html_gaea3762e4a27f1e42f8e03e6607917462"><div class="ttname"><a href="group__hardware__divider.html#gaea3762e4a27f1e42f8e03e6607917462">to_remainder_u32</a></div><div class="ttdeci">static uint32_t to_remainder_u32(divmod_result_t r)</div><div class="ttdoc">Efficient extraction of unsigned remainder from 32p32 fixed point.</div><div class="ttdef"><b>Definition:</b> divider.h:220</div></div>
<div class="ttc" id="agroup__pico__stdio_html_ga0e604311fb226dae91ff4eb17a19d67a"><div class="ttname"><a href="group__pico__stdio.html#ga0e604311fb226dae91ff4eb17a19d67a">stdio_init_all</a></div><div class="ttdeci">bool stdio_init_all(void)</div><div class="ttdoc">Initialize all of the present standard stdio types that are linked into the binary.</div><div class="ttdef"><b>Definition:</b> stdio.c:200</div></div>
<div class="ttc" id="arp2__common_2hardware__divider_2include_2hardware_2divider_8h_html"><div class="ttname"><a href="rp2__common_2hardware__divider_2include_2hardware_2divider_8h.html">divider.h</a></div></div>
<div class="ttc" id="astdio_8h_html"><div class="ttname"><a href="stdio_8h.html">stdio.h</a></div></div>
<div class="ttc" id="astdlib_8h_html"><div class="ttname"><a href="stdlib_8h.html">stdlib.h</a></div></div>
</div><!-- fragment --> <h2 class="groupheader">Function Documentation</h2>
<a id="ga806e168e895d53a3c261ba3e95ed2639" name="ga806e168e895d53a3c261ba3e95ed2639"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga806e168e895d53a3c261ba3e95ed2639">&#9670;&nbsp;</a></span>hw_divider_divmod_s32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static divmod_result_t hw_divider_divmod_s32 </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a signed HW divide and wait for result. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return result as a pair of 32-bit quotient/remainder values.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Results of divide as a pair of 32-bit quotient/remainder values. </dd></dl>

</div>
</div>
<a id="ga3388fa85b0c81ee403a3e5bb34dc7274" name="ga3388fa85b0c81ee403a3e5bb34dc7274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3388fa85b0c81ee403a3e5bb34dc7274">&#9670;&nbsp;</a></span>hw_divider_divmod_s32_start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void hw_divider_divmod_s32_start </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start a signed asynchronous divide. </p>
<p >Start a divide of the specified signed parameters. You should wait for 8 cycles (__div_pause()) or wait for the ready bit to be set (<a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>) prior to reading the results.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac2f4fea8c3ef19a04e574f64f5f520c2" name="gac2f4fea8c3ef19a04e574f64f5f520c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac2f4fea8c3ef19a04e574f64f5f520c2">&#9670;&nbsp;</a></span>hw_divider_divmod_u32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static divmod_result_t hw_divider_divmod_u32 </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do an unsigned HW divide and wait for result. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return result as a pair of 32-bit quotient/remainder values.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Results of divide as a pair of 32-bit quotient/remainder values. </dd></dl>

</div>
</div>
<a id="ga30b74e3742fbd3aeb6dfca568e8d0ae4" name="ga30b74e3742fbd3aeb6dfca568e8d0ae4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga30b74e3742fbd3aeb6dfca568e8d0ae4">&#9670;&nbsp;</a></span>hw_divider_divmod_u32_start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void hw_divider_divmod_u32_start </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start an unsigned asynchronous divide. </p>
<p >Start a divide of the specified unsigned parameters. You should wait for 8 cycles (__div_pause()) or wait for the ready bit to be set (<a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>) prior to reading the results.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1a4e287ce14e27ad959f30e16ee17e4f" name="ga1a4e287ce14e27ad959f30e16ee17e4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a4e287ce14e27ad959f30e16ee17e4f">&#9670;&nbsp;</a></span>hw_divider_quotient_s32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_quotient_s32 </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a signed HW divide, wait for result, return quotient. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return quotient.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Quotient results of the divide </dd></dl>

</div>
</div>
<a id="ga41fe9c9d7dd1e9638ec5dd724698adad" name="ga41fe9c9d7dd1e9638ec5dd724698adad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga41fe9c9d7dd1e9638ec5dd724698adad">&#9670;&nbsp;</a></span>hw_divider_remainder_s32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_remainder_s32 </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a signed HW divide, wait for result, return remainder. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return remainder.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Remainder results of the divide </dd></dl>

</div>
</div>
<a id="gaa8efb2ea90ef78f863b1c518c5824002" name="gaa8efb2ea90ef78f863b1c518c5824002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8efb2ea90ef78f863b1c518c5824002">&#9670;&nbsp;</a></span>hw_divider_restore_state()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void hw_divider_restore_state </td>
          <td>(</td>
          <td class="paramtype">hw_divider_state_t *&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Load a saved hardware divider state into the current core's hardware divider. </p>
<p >Copy the passed hardware divider state into the hardware divider.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>the location to load the divider state from </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga57310adb7901fb25ee82370130834e1d" name="ga57310adb7901fb25ee82370130834e1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga57310adb7901fb25ee82370130834e1d">&#9670;&nbsp;</a></span>hw_divider_result_nowait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static divmod_result_t hw_divider_result_nowait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of HW divide, nowait. </p>
<dl class="section note"><dt>Note</dt><dd>This is UNSAFE in that the calculation may not have been completed.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Current result. Most significant 32 bits are the remainder, lower 32 bits are the quotient. </dd></dl>

</div>
</div>
<a id="gac1fa72fbead3c6737dfcb4dd7b3db6ed" name="gac1fa72fbead3c6737dfcb4dd7b3db6ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac1fa72fbead3c6737dfcb4dd7b3db6ed">&#9670;&nbsp;</a></span>hw_divider_result_wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static divmod_result_t hw_divider_result_wait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of last asynchronous HW divide. </p>
<p >This function waits for the result to be ready by calling <a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Current result. Most significant 32 bits are the remainder, lower 32 bits are the quotient. </dd></dl>

</div>
</div>
<a id="ga23a3a2a911f5d78bb56799969b079f94" name="ga23a3a2a911f5d78bb56799969b079f94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga23a3a2a911f5d78bb56799969b079f94">&#9670;&nbsp;</a></span>hw_divider_s32_quotient_inlined()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_s32_quotient_inlined </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a hardware signed HW divide, wait for result, return quotient. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return quotient.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Quotient result of the divide </dd></dl>

</div>
</div>
<a id="gab10a183b8e7bd77ae20a811a4265ea56" name="gab10a183b8e7bd77ae20a811a4265ea56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab10a183b8e7bd77ae20a811a4265ea56">&#9670;&nbsp;</a></span>hw_divider_s32_quotient_wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_s32_quotient_wait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of last asynchronous HW divide, signed quotient only. </p>
<p >This function waits for the result to be ready by calling <a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Current signed quotient result. </dd></dl>

</div>
</div>
<a id="ga82f0cdc6ef9e74346c0af8e492a0eb8d" name="ga82f0cdc6ef9e74346c0af8e492a0eb8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga82f0cdc6ef9e74346c0af8e492a0eb8d">&#9670;&nbsp;</a></span>hw_divider_s32_remainder_inlined()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_s32_remainder_inlined </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a hardware signed HW divide, wait for result, return remainder. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return remainder.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Remainder result of the divide </dd></dl>

</div>
</div>
<a id="gad2e7f31926e286544a8d47fdf8131eb5" name="gad2e7f31926e286544a8d47fdf8131eb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2e7f31926e286544a8d47fdf8131eb5">&#9670;&nbsp;</a></span>hw_divider_s32_remainder_wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t hw_divider_s32_remainder_wait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of last asynchronous HW divide, signed remainder only. </p>
<p >This function waits for the result to be ready by calling <a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Current remainder results. </dd></dl>

</div>
</div>
<a id="gac12f398a163e90ca4d52386bd7e161b9" name="gac12f398a163e90ca4d52386bd7e161b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac12f398a163e90ca4d52386bd7e161b9">&#9670;&nbsp;</a></span>hw_divider_save_state()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void hw_divider_save_state </td>
          <td>(</td>
          <td class="paramtype">hw_divider_state_t *&#160;</td>
          <td class="paramname"><em>dest</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Save the calling cores hardware divider state. </p>
<p >Copy the current core's hardware divider state into the provided structure. This method waits for the divider results to be stable, then copies them to memory. They can be restored via <a class="el" href="group__hardware__divider.html#gaa8efb2ea90ef78f863b1c518c5824002" title="Load a saved hardware divider state into the current core&#39;s hardware divider.">hw_divider_restore_state()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dest</td><td>the location to store the divider state </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8f8f25f9f8feefb588fefed9992e180b" name="ga8f8f25f9f8feefb588fefed9992e180b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8f8f25f9f8feefb588fefed9992e180b">&#9670;&nbsp;</a></span>hw_divider_u32_quotient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_quotient </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do an unsigned HW divide, wait for result, return quotient. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return quotient.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Quotient results of the divide </dd></dl>

</div>
</div>
<a id="gad18c35723af182a45e044b29cd1e60b2" name="gad18c35723af182a45e044b29cd1e60b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad18c35723af182a45e044b29cd1e60b2">&#9670;&nbsp;</a></span>hw_divider_u32_quotient_inlined()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_quotient_inlined </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a hardware unsigned HW divide, wait for result, return quotient. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return quotient.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Quotient result of the divide </dd></dl>

</div>
</div>
<a id="ga56d6c26b06211b6f6ae3069b2c612562" name="ga56d6c26b06211b6f6ae3069b2c612562"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga56d6c26b06211b6f6ae3069b2c612562">&#9670;&nbsp;</a></span>hw_divider_u32_quotient_wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_quotient_wait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of last asynchronous HW divide, unsigned quotient only. </p>
<p >This function waits for the result to be ready by calling <a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Current unsigned quotient result. </dd></dl>

</div>
</div>
<a id="gaa9fec9c4204fb6f874f660b529190d96" name="gaa9fec9c4204fb6f874f660b529190d96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa9fec9c4204fb6f874f660b529190d96">&#9670;&nbsp;</a></span>hw_divider_u32_remainder()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_remainder </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do an unsigned HW divide, wait for result, return remainder. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return remainder.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Remainder results of the divide </dd></dl>

</div>
</div>
<a id="ga46f7b5751556b7b1d5600561160abb3c" name="ga46f7b5751556b7b1d5600561160abb3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga46f7b5751556b7b1d5600561160abb3c">&#9670;&nbsp;</a></span>hw_divider_u32_remainder_inlined()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_remainder_inlined </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Do a hardware unsigned HW divide, wait for result, return remainder. </p>
<p >Divide <code>a</code> by <code>b</code>, wait for calculation to complete, return remainder.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The dividend </td></tr>
    <tr><td class="paramname">b</td><td>The divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Remainder result of the divide </dd></dl>

</div>
</div>
<a id="ga2e23739484aa748a5900d215d279acdf" name="ga2e23739484aa748a5900d215d279acdf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e23739484aa748a5900d215d279acdf">&#9670;&nbsp;</a></span>hw_divider_u32_remainder_wait()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t hw_divider_u32_remainder_wait </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return result of last asynchronous HW divide, unsigned remainder only. </p>
<p >This function waits for the result to be ready by calling <a class="el" href="group__hardware__divider.html#ga82cfc7c264f332ad15135158a37821dc" title="Wait for a divide to complete.">hw_divider_wait_ready()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Current unsigned remainder result. </dd></dl>

</div>
</div>
<a id="ga82cfc7c264f332ad15135158a37821dc" name="ga82cfc7c264f332ad15135158a37821dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga82cfc7c264f332ad15135158a37821dc">&#9670;&nbsp;</a></span>hw_divider_wait_ready()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void hw_divider_wait_ready </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wait for a divide to complete. </p>
<p >Wait for a divide to complete </p>

</div>
</div>
<a id="ga62820b8678505f5ea007cedd012da0aa" name="ga62820b8678505f5ea007cedd012da0aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62820b8678505f5ea007cedd012da0aa">&#9670;&nbsp;</a></span>to_quotient_s32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t to_quotient_s32 </td>
          <td>(</td>
          <td class="paramtype">divmod_result_t&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Efficient extraction of signed quotient from 32p32 fixed point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>A pair of 32-bit quotient/remainder values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Unsigned quotient </dd></dl>

</div>
</div>
<a id="ga21752b8ee127370df37cd9a9e4e4050e" name="ga21752b8ee127370df37cd9a9e4e4050e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21752b8ee127370df37cd9a9e4e4050e">&#9670;&nbsp;</a></span>to_quotient_u32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t to_quotient_u32 </td>
          <td>(</td>
          <td class="paramtype">divmod_result_t&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Efficient extraction of unsigned quotient from 32p32 fixed point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>A pair of 32-bit quotient/remainder values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Unsigned quotient </dd></dl>

</div>
</div>
<a id="ga7ca08fd8fd1961ee25233d4587067178" name="ga7ca08fd8fd1961ee25233d4587067178"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ca08fd8fd1961ee25233d4587067178">&#9670;&nbsp;</a></span>to_remainder_s32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int32_t to_remainder_s32 </td>
          <td>(</td>
          <td class="paramtype">divmod_result_t&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Efficient extraction of signed remainder from 32p32 fixed point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>A pair of 32-bit quotient/remainder values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Signed remainder</dd></dl>
<dl class="section note"><dt>Note</dt><dd>On arm this is just a 32 bit register move or a nop </dd></dl>

</div>
</div>
<a id="gaea3762e4a27f1e42f8e03e6607917462" name="gaea3762e4a27f1e42f8e03e6607917462"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaea3762e4a27f1e42f8e03e6607917462">&#9670;&nbsp;</a></span>to_remainder_u32()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t to_remainder_u32 </td>
          <td>(</td>
          <td class="paramtype">divmod_result_t&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Efficient extraction of unsigned remainder from 32p32 fixed point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>A pair of 32-bit quotient/remainder values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Unsigned remainder</dd></dl>
<dl class="section note"><dt>Note</dt><dd>On Arm this is just a 32 bit register move or a nop </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>